#include <light.h>
Inheritance diagram for mudbox::Light:
Public Types |
|
enum | LightType { LIGHT_DIRECTIONAL = 0, LIGHT_POINT, LIGHT_SPOT, LIGHT_IBL, LIGHT_NONE } |
Public Member Functions |
|
virtual const mudbox::ClassDesc * | RuntimeClass (void) const |
virtual Color | Diffuse (void) const |
Returns the diffuse color value of the
light. |
|
virtual void | SetDiffuse (const Color &cDiffuse) |
Sets the diffuse color value of the light.
|
|
virtual float | Intensity (void) const |
Returns the light intensity in range 0..1.
|
|
virtual void | SetIntensity (float fIntensity) |
Sets the light intensity in range 0..1.
|
|
virtual bool | IsLockedToCamera (void) const |
Returns true if the light direction is
locked to the camera direction. |
|
virtual void | SetLockedToCamera (bool bOnOrOff) |
Set lock/unlock to camera. |
|
virtual bool | Render (void) |
Renders the light manipulator or light
geometry, if they are turned on. |
|
virtual Manipulator * | GetManipulator () |
Returns a pointer to the light's
manipulator, or NULL if no manipulator has been created. |
|
virtual void | ValidateShadowMap () |
Checks and updates the shadow map (if
shadowing is turned on). |
|
virtual Texture * | ShadowDepthMap () |
Returns the depth map associated with the
light. |
|
virtual const Matrix & | ShadowMatrix () const |
Returns the shadow/depth map matrix
associated with light. |
|
virtual bool | CastShadow () |
Returns true if shadow castinging is
enabled for this light. |
|
virtual float | ShadowBias () |
Returns the shadow bias for this light.
|
|
virtual LightType | Type () |
Returns the type of this light. |
|
virtual void | SetAttenuation (float) |
Sets the light attenuation value. Range is
from 0-1. |
|
virtual float | Attenuation (void) const |
Returns the light attenuation value.
|
|
virtual Matrix | LockedToCameraMatrix () const |
Returns the "locked to camera" matrix.
|
|
virtual Image * | HDRImage () const |
Returns the HDRI image associated with this
light, if any. Returns a NULL pointer if this is not an HDRI light.
|
|
virtual const QString * | HDRImageFilename () const |
Static Public Member Functions |
|
const mudbox::ClassDesc * | StaticClass (void) |
mudbox::Node * | CreateInstances (unsigned int iCount=1) |
Protected Member Functions |
|
Light (void) | |
Constructor. Do not use this directly. Use
CreateInstances() instead.
|
|
00037 { 00038 LIGHT_DIRECTIONAL=0, 00039 LIGHT_POINT, 00040 LIGHT_SPOT, 00041 LIGHT_IBL, 00042 LIGHT_NONE, 00043 }; |
|
Constructor. Do not use this directly. Use CreateInstances() instead. This is the typical way to create a Light: Light *myLight = CreateInstance<Light>(); |
|
Reimplemented from mudbox::GroupNode. 00025 : |
|
Reimplemented from mudbox::GroupNode. |
|
Reimplemented from mudbox::GroupNode. |
|
Returns the diffuse color value of the light. |
|
Sets the diffuse color value of the light.
|
|
Returns the light intensity in range 0..1. |
|
Sets the light intensity in range 0..1.
|
|
Returns true if the light direction is locked to the camera direction. |
|
Set lock/unlock to camera.
|
|
Renders the light manipulator or light geometry, if they are turned on. |
|
Returns a pointer to the light's manipulator, or NULL if no manipulator has been created. |
|
Checks and updates the shadow map (if shadowing is turned on). |
|
Returns the depth map associated with the light. |
|
Returns the shadow/depth map matrix associated with light. This matrix is the 'view matrix' of the light. It is used to render the scene from the light's perspective (and thus create a depth buffer), and to transform the main scene depth values into 'light space' so we can compare the main scene depth values to the light's scene depth values. This is used to create shadow maps for the light. |
|
Returns true if shadow castinging is enabled for this light. |
|
Returns the shadow bias for this light. Bias does not have a fixed range, but generally lies between -1 & 1. It is used to offset the depth map either toward the light’s position or away from it. This is used to correct any inaccuracies in the depth comparison caused by precision loss. (Either when converting the pixel’s position to light space or in the depth map itself). Similar to polygon offset in OpenGL. |
|
Returns the type of this light. Possible return values are Light::LIGHT_DIRECTIONAL, Light::LIGHT_POINT, Light::LIGHT_SPOT, Light::LIGHT_IBL, or Light::LIGHT_NONE. |
|
Sets the light attenuation value. Range is from 0-1. This is called "Light Decay" in the UI. |
|
Returns the light attenuation value. Range is from 0-1. This is called "Light Decay" in the UI. |
|
Returns the "locked to camera" matrix. This matrix represents the initial camera matrix (on start up or when the light is created) multiplied by the inverse of the current camera matrix and the inverse of the current light matrix. Effectively, it is the 'delta' between the camera position, and the position of a light that is locked to it. Use this to get the current world space location of a light relative to the camera. |
|
Returns the HDRI image associated with this light, if any. Returns a NULL pointer if this is not an HDRI light. |
|